package models

import (
	"gorm.io/gorm"
	"time"
)

type Users struct {
	Id        int64          `gorm:"column:id;type:bigint(20);primaryKey;not null;" json:"id"`
	Tel       string         `gorm:"column:tel;type:char(11);not null;" json:"tel"`
	Password  string         `gorm:"column:password;type:varchar(255);not null;" json:"password"`
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdateAt  time.Time      `gorm:"column:update_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}
type Ticket struct {
	Id        int32          `gorm:"column:id;type:int(3);primaryKey;not null;" json:"id"`
	TimeData  time.Time      `gorm:"column:time_data;type:datetime(3);not null;" json:"time_data"`
	Yupiao    int32          `gorm:"column:yupiao;type:int(20);not null;" json:"yupiao"`
	Status    int32          `gorm:"column:status;type:int(2);comment:1:候补 2:有座 3:无座;not null;" json:"status"` // 1:候补 2:有座 3:无座
	Price     float64        `gorm:"column:price;type:decimal(10, 2);not null;" json:"price"`
	Zuo       int64          `gorm:"column:zuo;type:bigint(34);comment:坐席选择：1:硬座2：软座:3：硬卧4：软卧;not null;" json:"zuo"` // 坐席选择：1:硬座2：软座:3：硬卧4：软卧
	CreatedAt time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	UpdateAt  time.Time      `gorm:"column:update_at;type:datetime(3);not null;" json:"update_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
}
